FileFormat
FileFormat[source] attempts to determine what Import format could be used to import the file corresponding to source.
FileFormat[source,{fmt1,fmt2,…}] returns the first "fmti" that can be used to import source.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.